load("//bazel:skia_rules.bzl", "generate_cpp_files_for_headers", "skia_filegroup")

package(
    default_applicable_licenses = ["//:license"],
)

licenses(["notice"])

ENCODE_HDRS = ["SkEncoder.h"]

skia_filegroup(
    name = "encode_hdrs",
    srcs = ENCODE_HDRS,
    visibility = ["//src/encode:__pkg__"],
)

ICC_HDRS = ["SkICC.h"]

skia_filegroup(
    name = "icc_hdrs",
    srcs = ICC_HDRS,
    visibility = ["//src/encode:__pkg__"],
)

JPEG_HDRS = ["SkJpegEncoder.h"]

skia_filegroup(
    name = "jpeg_hdrs",
    srcs = JPEG_HDRS,
    visibility = ["//src/encode:__pkg__"],
)

PNG_HDRS = ["SkPngEncoder.h"]

skia_filegroup(
    name = "png_hdrs",
    srcs = PNG_HDRS,
    visibility = ["//src/encode:__pkg__"],
)

RUST_PNG_HDRS = ["SkPngRustEncoder.h"]

skia_filegroup(
    name = "rust_png_public_hdrs",
    srcs = RUST_PNG_HDRS,
    visibility = ["//src/encode:__pkg__"],
)

WEBP_HDRS = ["SkWebpEncoder.h"]

skia_filegroup(
    name = "webp_hdrs",
    srcs = WEBP_HDRS,
    visibility = ["//src/encode:__pkg__"],
)

generate_cpp_files_for_headers(
    name = "headers_to_compile",
    headers = ENCODE_HDRS +
              ICC_HDRS +
              JPEG_HDRS +
              PNG_HDRS +
              RUST_PNG_HDRS +
              WEBP_HDRS,
)
